from django.conf.urls import url

from . import views

urlpatterns = [
    # 1.找回密码页面展示
    url(r'^find_password/$', views.FindPasswordView.as_view(), name='findpassword'),
    # 2.验证用户是否存在
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/sms/token/$', views.AccountsView.as_view(), name='accounts'),
    # 3.获取短信验证码
    url(r'^sms_codes/$', views.SmsCodeGetView.as_view(), name='smscodeget'),
    # 4.找回密码短信验证
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/password/token/$', views.SmsCodeCheckView.as_view(),name='smscodecheck'),
    # 5.重写密码
    url(r'^users/(?P<user_id>\d+)/password/$', views.PwdSetView.as_view(),name='pwdset'),

]
